﻿using Clinic.IService;
using Clinic.Model.Dto;
using Clinic.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Clinic.Service
{
    public class RoleService : IRoleService
    {
        public Task<PaginationData<Role>> GetPaginationDataAsync(int pageIndex, int pageSize)
        {
            var list = new List<Role> {
                new Role() { Id = Guid.NewGuid(), RoleName = "管理员" } ,
                new Role() { Id = Guid.NewGuid(), RoleName = "医生" } ,
                new Role() { Id = Guid.NewGuid(), RoleName = "护士" } ,
                new Role() { Id = Guid.NewGuid(), RoleName = "药师" }
            };
            PaginationData<Role> data = new PaginationData<Role>();
            data.TotalCount = list.Count;
            data.Items = list.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
            return Task.FromResult(data);
        }
    }
}
